﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace FantasyDraft2.Models
{
    public class User
    {
        [Key]
        public int UserId { get; set; }

        [Display(Name = "User name")]
        public string UserName { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [Display(Name = "First Name")]
        public string FirstName { get; set; }

        [Display(Name = "Last Name")]
        public string LastName { get; set; }

        [Display(Name = "Team Name")]
        public string TeamName { get; set; }
        
        public int Age { get; set; }
        public int TeamId { get; set; }
        public int Score { get; set; }
        public DateTime Birthdate { get; set; }
        public DateTime DateOfFormation { get; set; }

        //User has a 1 to Many relationship with Player so an Enumerable collection must be made in order to communicate.  
        public IEnumerable<Player> UserPlayers { get; set; }

        //User has a 1 to Many relationship with UserComment so an Enumerable collection must be made in order to communicate.  
        public IEnumerable<UserComment> UserComments { get; set; }
    }
}